package cn.lg.soar.mvc.annotations;

import cn.lg.soar.mvc.enums.ControllerConst;
import io.swagger.annotations.ApiOperation;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)

@ApiOperation(value = ControllerConst.DETAIL_NAME, notes = "根据 ID 获取一条数据")
@RequestMapping(path = ControllerConst.DETAIL_PATH, method = RequestMethod.GET, name = ControllerConst.DETAIL_NAME)
public @interface DetailMapping {
    @AliasFor(
            annotation = RequestMapping.class
    )
    String[] params() default {};

    @AliasFor(
            annotation = RequestMapping.class
    )
    String[] headers() default {};

    @AliasFor(
            annotation = RequestMapping.class
    )
    String[] consumes() default {};

    @AliasFor(
            annotation = RequestMapping.class
    )
    String[] produces() default {};
}
